package com.onest;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

public class MyAspectProxy implements MethodInterceptor {
    @Override
    public Object invoke(MethodInvocation methodInvocation) throws Throwable {
        checkPermissions();
        Object obj=methodInvocation.proceed();
        log();
        return obj;
    }
    public void checkPermissions(){
        System.out.println("权限检查");
    }
    public void log(){
        System.out.println("日志");
    }
}
